import { headApi } from '@/api/home.js'

export default {
  namespaced: true,
  state: () => {
    return { list: [] }
  },
  mutations: {
    setList(state, headCategory) {
      state.list = headCategory
    }
  },
  actions: {
    async asyncSetList(context) {
      const res = await headApi()
      console.log(res)
      context.commit('setList', res.result)
    }
  }
}
